import com.sun.media.sound.SoftTuning;

import java.util.Scanner;

/**
 * Test the power method.
 * We use recursion (two times) to solve the problem.
 * @author Jarvan
 * @version 1.0
 * @create 2020/11/13 17:23
 */
public class Driver {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("input x(double) :");
        Double x = scanner.nextDouble();
        System.out.println("input n(int) :");
        int n = scanner.nextInt();
        System.out.println("the result of x power 2 power n is:");
        double result = Power.power(x,(int)Power.power(2.0,n));
        System.out.println(result);
    }
}
